﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseData.Domain
{
    /// <summary>
    /// 忽略导出特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class IgnoreExportAttribute : Attribute
    {
        public string Name { get; set; }
        public IgnoreExportAttribute(string name)
        {
            Name = name;
        }
    }
    /// <summary>
    /// 角色表
    /// </summary>
    public class Roles:BaseEneity
    {
        [Key]
        [IgnoreExport("角色编号")]
        public int RoleId { get; set; }
        /// <summary>
        /// 角色名称
        /// </summary>
        [IgnoreExport("角色名称")]
        public string? RoleName { get; set; }
        /// <summary>
        /// 状态
        /// true:启用，false：禁用
        /// </summary>
        [IgnoreExport("状态")]
        public bool RoleState { get; set; } = true;
        /// <summary>
        /// 备注内容
        /// </summary>
        [IgnoreExport("备注内容")]
        public string? Remark { get; set;}
        /// <summary>
        /// 成员数量
        /// </summary>
        [IgnoreExport("成员数量")]
        public int MemberCount {  get; set; }
        /// <summary>
        /// 部门描述
        /// </summary>
        [StringLength(200)]
        [IgnoreExport("部门描述")]
        public string? DeptDescription {  get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        [IgnoreExport("更新时间")]
        public DateTime? UpdateTime { get; set; }
    }
}
